-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC Document using symfony/validator logic #590
DOC Document using symfony/validator logic #590
Conversation
You can also enforce that passwords are not repeated by setting the [`EntropyPasswordValidator.historic_count`](api:SilverStripe\Security\Validation\EntropyPasswordValidator->historic_count) configuration property: | ||
|
||
```yml | ||
SilverStripe\Security\Validation\EntropyPasswordValidator: | ||
historic_count: 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also enforce that passwords are not repeated by setting the [`EntropyPasswordValidator.historic_count`](api:SilverStripe\Security\Validation\EntropyPasswordValidator->historic_count) configuration property: | |
```yml | |
SilverStripe\Security\Validation\EntropyPasswordValidator: | |
historic_count: 6 | |
You can also enforce that passwords are not repeated by setting the [`EntropyPasswordValidator.historic_count`](api:SilverStripe\Security\Validation\PasswordValidator->historic_count) configuration property: | |
```yml | |
SilverStripe\Security\Validation\PasswordValidator: | |
historic_count: 6 |
Configuration is defined on PasswordValidator, and also works if it password validator is changed to RulesPasswordValidator or a custom password validator
I assume this works if we set it on the abstract class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work if set on the abstract class, yeah. Though IMO it makes more sense to set it on whichever validator is in use - i.e. you set the validation you want for the validator you want to use.
Given the sections are currently split up to discuss the individual validators, I'd like to keep the config being set for those validators - I think it'd read weirdly in a section about one validator you're setting config on its parent class.
All that said, I don't feel strongly so if you still want it changed I can change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say change it to the abstract class, as if people change the validator in the future they'll retain the historic password count config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
7f2ff4e
to
098a0c3
Compare
Fixed lint failure |
098a0c3
to
ed30173
Compare
Issue
symfony/validator
for as much validation logic as we can throw at it. .github#193